import { createApp, reactive } from "petite-vue"
import Calc from "./Calc"

window.store = reactive({
    calc1: {
        discount: 50
    },
    calc2: {
        discount: 50
    },
})

window.effects1 = {
    'sum, input': (sum, input) => {
        document.querySelector('#out-of-petite-vue1 i').textContent = sum
        document.querySelector('#out-of-petite-vue1 span').textContent = input
    }
}

window.effects2 = {
    'sum, input': (sum, input) => {
        document.querySelector('#out-of-petite-vue2 i').textContent = sum
        document.querySelector('#out-of-petite-vue2 span').textContent = input
    }
}

createApp({
    Calc: Calc()
}).mount('body')
